//
//  NSObject+FFBind.h
//  FFMVVM
//
//  Created by AKsoftware on 2016/11/1.
//  Copyright © 2016年 AKsoftware. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FFBindUnit.h"

@interface NSObject (FFBind)

//use for FFBindUnit
- (void)addBindUinit:(nonnull FFBindUnit *)unit;


//observer
- (void)addBindObserver:(nonnull NSObject *)object
        forkeyPathArray:(nullable NSArray <NSString *> *)keyPathArray
                options:(NSKeyValueObservingOptions)opthions
           performQueue:(nullable dispatch_queue_t)queue
           performBlock:(nullable void(^)( NSString * _Nonnull key,  id _Nullable value))block;
//observer
- (void)addBindObserver:(nonnull NSObject *)object
        forkeyPathArray:(nullable NSArray <NSString *> *)keyPathArray
                options:(NSKeyValueObservingOptions)opthions
          performThread:(nullable NSThread *)thread
           performBlock:(nullable void(^)( NSString * _Nonnull key,  id _Nullable value))block;
//remove

- (void)removeAllBindObject;

- (void)removeAllBindObserver;
- (void)removeBindObserver:(nonnull NSObject *)observer;

- (void)removeAllBindTarget;
- (void)removeBindTarget:(nonnull NSObject *)target;

@end
